#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
bool vis[maxn];
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n,k;n=read();k=read();
  LL t=__gcd(n,(LL)3);
  if(n==2&&k==1){
    cout<<"-1"<<endl;
  }
  else if(n<6&&k==n/2){
    cout<<"-1"<<endl;
  }
  else{
    if(t==1){
        if(k==n/2){
            LL sum=k+2;
            LL p=2;
            for(LL i=1;i<=sum-2;i++){
                if(p!=6) cout<<p<<" ";
                vis[p]=true;p+=2;
            }
            cout<<6<<" "<<3<<" ";
            vis[3]=true;
            for(LL i=1;i<=n;i++){
                if(!vis[i]) cout<<i<<" ";
            }
            cout<<endl;
        }
        else{
            LL sum=k+1;
            LL p=2;
            for(LL i=1;i<=sum;i++){
                cout<<p<<" ";
                vis[p]=true;p+=2;
            }
            for(LL i=1;i<=n;i++){
                if(!vis[i]) cout<<i<<" ";
            }
            cout<<endl;
        }
    }
    else{
        if(k==n/2){
            LL sum=k+3;
            LL p=2;
            for(LL i=1;i<=sum-3;i++){
                if(p!=6)cout<<p<<" ";
                vis[p]=true;p+=2;
            }
            cout<<6<<" "<<3<<" ";
            vis[6]=true;vis[3]=true;
            for(LL i=1;i<=n;i++){
                if(!vis[i]) cout<<i<<" ";
            }
            cout<<endl;
        }
        else{
            LL sum=k+1;
            LL p=2;
            for(LL i=1;i<=sum;i++){
                cout<<p<<" ";
                vis[p]=true;p+=2;
            }
            for(LL i=1;i<=n;i++){
                if(!vis[i]) cout<<i<<" ";
            }
            cout<<endl;
        }
    }
  }
return 0;
}
